home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / menu-new.tar / menu-new / menu / dir.h < prev    next >
C/C++ Source or Header  |  1992-07-09  |  1KB  |  67 lines

  1. # include <ctype.h>
  2.  
  3. # define  PRT_MENU    "Choose a printer: arrow keys to move, return to select, 'q' to quit"
  4. # define  PRINT_PATH    "/usr/local/lib/menus/printers"
  5. # ifndef HPUX
  6. # define  PRT_TO_SCR    "/usr/bin/more"
  7. # else
  8. # define  PRT_TO_SCR    "/usr/bin/more"
  9. # endif HPUX
  10. # define  OTHER_LINE    "n)ext page p)revious page"
  11.  
  12. # define    UP        252
  13. # define    DOWN        253
  14. # define    LEFT        254
  15. # define    RIGHT        255
  16.  
  17. # define    MAX_PRINTERS    24
  18. # define    MAX_ENT        1024
  19. # define    ENT_LEN        20
  20.  
  21. # define    isposodd(x) (x % 2)
  22. # define    in_col_one(x) ((x / 2) + (x % 2))
  23. # define    in_col_two(x) (x - in_col_one(x))
  24.  
  25. struct print_options
  26. {
  27.     char selection[80];
  28.     int option;
  29.     int x;
  30.     int y;
  31. };
  32.  
  33. static struct print_options print_opts[6] = {
  34.     {"CANCEL",0,5,20},
  35.     {"PRINT",0,16,20},
  36.     {"(Spacing %d)",0,26,20},
  37.     {"(Skip Page Break %s)",0,41,20},
  38.     {"(Copies %d)",0,65,20}
  39. };
  40.  
  41. typedef struct
  42. {
  43.     char comment[40];
  44.     char command[128];
  45. }printer;
  46.  
  47. typedef struct 
  48. {
  49.     int max_row;
  50.     int max_col;
  51. }dir_info;
  52.  
  53. extern DIR *opendir();
  54. # if defined (SUN) || defined (BSD43)
  55. struct direct *readdir();
  56. # else
  57. # endif (SUN || BSD43)
  58. # ifdef BSD43
  59. extern struct direct *readdir();
  60. void closedir();
  61. # else
  62. int closedir();
  63. # endif BSD43
  64.  
  65. int strcmp();
  66.  
  67.